semantic algebra